<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Courses</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
    <h1>Courses</h1>
    <a href="{{ url_for('courses.add_course') }}">Add New Course</a>
    <table>
        <tr>
            <th>ID</th>
            <th>Name</th>
            <th>Description</th>
            <th>Actions</th>
        </tr>
        {% for course in courses %}
        <tr>
            <td>{{ course.id }}</td>
            <td>{{ course.name }}</td>
            <td>{{ course.description }}</td>
            <td>
                <a href="{{ url_for('courses.edit_course', id=course.id) }}">Edit</a>
                <form action="{{ url_for('courses.delete_class', id=course.id) }}" method="post" style="display:inline;">
                    <button type="submit">Delete</button>
                </form>
            </td>
        </tr>
        {% endfor %}
    </table>
</body>
</html>
